import os
import tornado.ioloop
import tornado.web
import index
import equipment

settings = {
    "static_path": os.path.join(os.path.dirname(__file__), "static"),
    "login_url": "/login",
}

application = tornado.web.Application([
    (r"/", index.IndexHandler),
    (r"/equipment/edit", equipment.EditHandler),
], **settings)

if __name__ == "__main__":
    application.listen(8888)
    print("System running on port 8888.")
    tornado.ioloop.IOLoop.instance().start()
